import React from 'react';

import {RouterProvider} from "react-router-dom";
import {App as AntdMessage ,ConfigProvider, theme } from 'antd';
import locale from 'antd/locale/zh_CN';
import 'dayjs/locale/zh-cn';

import useRouteAutoConfig from "./router/UseRouteAutoConfig";

function App() {
    const { message } = AntdMessage.useApp();
    let route = useRouteAutoConfig(message);
  return (
      <ConfigProvider locale={locale} theme={{
          algorithm: theme.defaultAlgorithm,
          token: {
              colorBgBase: "rgb(222,222,238)"
          }
      }}>
          <RouterProvider router={route}/>
      </ConfigProvider>
  );
}

export default App;
